package com.yolo.mapper;

import com.yolo.entity.Errand;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 霜蟾
 * @since 2021-04-26
 */
public interface ErrandMapper extends BaseMapper<Errand> {
    @Select("SELECT * FROM yolo_errand WHERE date_format(errand_time,'%Y-%m') = date_format(now(),'%Y-%m') and emp_id=#{empId} ")
    List<Errand> queryErrandByCurrentMonth(@Param("empId") Integer empId);
}
